home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation: Next View / Next Generation Disc Magazine 1 (1996).ISO / pc / media / demos.dxr / Internal_1.ls < prev    next >
Encoding:
Text File  |  1996-08-26  |  1.2 KB  |  45 lines

  1. on startMovie
  2.   set the volume of sound 1 to 255
  3.   set the volume of sound 2 to 255
  4.   set the constraint of sprite 35 to 34
  5.   set the visible of sprite 20 to 0
  6.   set the visible of sprite 21 to 0
  7.   set the visible of sprite 22 to 0
  8.   set the visible of sprite 23 to 0
  9.   set the visible of sprite 24 to 0
  10.   set the visible of sprite 25 to 0
  11.   set the visible of sprite 27 to 0
  12.   set the visible of sprite 28 to 0
  13.   set the visible of sprite 29 to 0
  14. end
  15.  
  16. on setSoundLevel whichSprite, pmin, pmax
  17.   global gSoundLevel, gThumbPuppet
  18.   set curpos to the locH of sprite whichSprite
  19.   set gSoundLevel to integer((curpos - pmin) * 8 / (pmax - pmin))
  20.   set gSoundLevel to min(max(gSoundLevel, 0), 7)
  21.   set the soundLevel to gSoundLevel
  22.   set gThumbPuppet to whichSprite
  23.   return gSoundLevel
  24. end
  25.  
  26. on setSoundPos whichSprite, pmin, pmax
  27.   global gSoundLevel, gThumbPuppet
  28.   set curpos to pmin + integer(gSoundLevel * (pmax - pmin) / 7)
  29.   puppetSprite(whichSprite, 1)
  30.   set the locH of sprite whichSprite to curpos
  31.   updateStage()
  32.   set gThumbPuppet to whichSprite
  33.   return curpos
  34. end
  35.  
  36. on clearThumb
  37.   global gThumbPuppet
  38.   puppetSprite(gThumbPuppet, 0)
  39.   updateStage()
  40. end
  41.  
  42. on stopMovie
  43.   clearThumb()
  44. end
  45.